<template>
  <boss-view>
    <head-view slot="head" :user="true" :backspace="false">
      <span slot="title" class="title">集团</span>
    </head-view>
    <div slot="tabs">
      <top-bar-sel :barWidth="''" :topNav="topNav" @changeTab="onNav"></top-bar-sel>
      <div class="tab-content" id="myScrollContent">
        <finance v-if="tabId == '1'" :time="finanItem"></finance>
        <capital v-if="tabId == '2'" :time="finanItem"></capital>
        <operate v-if="tabId == '3'" :time="finanItem"></operate>
      </div>
      <scroll-top></scroll-top>
    </div>
  </boss-view>
</template>

<script>
import $ from "jquery";
import scrollTop from "@/components/scrollTop/scrollTop";
import topBarSel from "@/components/branch/topBarSel";
import finance from "@/view/jituan/finance";
import capital from "@/view/jituan/capital";
import operate from "@/view/jituan/operate";
import viewItem from "@/components/bossVersion/viewItem";
import headView from "@/components/bossVersion/headView";
import bossView from "@/components/bossVersion/bossView";
export default {
  components: {
    scrollTop,
    topBarSel,
    finance,
    capital,
    operate,
    viewItem,
    headView,
    bossView
  },
  data() {
    return {
      tabId: "1",
      finanItem: "",
      topNav: [
        {
          name: "财务情况",
          id: "1"
        },
        {
          name: "资金流转",
          id: "2"
        },
        {
          name: "经营战略",
          id: "3"
        }
      ]
    };
  },
  mounted() {},
  methods: {
    onTime(res) {
      this.finanItem = res;
      this.onNav(this.tabId);
    },
    onNav(id) {
      this.tabId = id;
      $(".tab-content").scrollTop(0);
    },
    // 跳页面
    pushPage(name) {
      this.$router.push({
        path: name
      });
    }
  }
};
</script>
